<template>
  <div class="insurance" v-if="list.length>0">
    <div v-for="item in list" class="insurance-item">
      <div style="flex: 1"><img
        :src="item.icon"
        width="60px"></div>
      <div class="insurance-name" >
        <p>{{item.name}}</p>
      </div>
      <div class="insurance-price">
        <p>{{item.price}}</p>
      </div>
      <div class="insurance-count" >
        <p>{{count}}</p>
      </div>
      <div class="insurance-total">
        <p>{{item.price*count}}</p>
      </div>.
      <div class="insurance-control">

      </div>
    </div>


  </div>

</template>

<script>
  export default {
    name: "insurance",
    props: {
      list: {
        type: Array,
        default: () => {
        }
      },
      count:{
        type: Number,
        default:0
      }
    },

    created() {
    }
  }
</script>

<style scoped>
  .insurance-item {
    display: flex;
    align-items: center;
    height: 100%;
  }

  .insurance {
    padding-left: 9%;
    height: 80px;
    padding-bottom:20px;
    padding-right: 20px;
  }
  .insurance-name{
    flex: 3;
    color: black;
  }
  .insurance-price{
    flex: 1;
    color: black;
  }
  .insurance-count{
    flex: 2;
  }
  .insurance-total{
    flex: 1;
    color: #FF6600;
    font-size: 16px;
  }
  .insurance-control{
    flex: 1;
  }
</style>
